/*****************************************
 * Copyright (c) 2008 by AvePoint, Inc
 *
 * AvePoint, Inc.
 * 3 Second Street, Suite 803
 * Jersey City, NJ 07311
 * United States of America
 * Telephone: +1-201-793-1111
 * WWW: www.avepoint.com
 */
package com.myassignment.util;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeStampUtil {

    private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static String getCurrentTimeString() {
        return String.valueOf(System.currentTimeMillis());
    }
    public static String formatCurrentTime() {
      Timestamp now = new Timestamp(System.currentTimeMillis());
      return simpleDateFormat.format(now);
    }
    public static String formatCurrentTime(Date date) {
        return simpleDateFormat.format(date);
    }
}
